using System;
using UnityEngine;

[ExecuteInEditMode]
public class PresetsRamp : MonoBehaviour
{
	public float angle;

	private void LateUpdate()
	{
		float z = base.transform.localScale.z;
		float y = base.transform.localScale.y;
		angle = Mathf.Atan(y / z) * 57.29578f;
	}

	public void SeteazaUnghiPastrezaInaltimea(float unghi)
	{
		float y = base.transform.localScale.y;
		float z = y / Mathf.Tan(unghi * ((float)Math.PI / 180f));
		base.transform.localScale = new Vector3(base.transform.localScale.x, y, z);
	}

	public void SeteazaUnghiPastreazaLungimea(float unghi)
	{
		float z = base.transform.localScale.z;
		float y = z * Mathf.Tan(unghi * ((float)Math.PI / 180f));
		base.transform.localScale = new Vector3(base.transform.localScale.x, y, z);
	}
}
